package com.etoak.rst.sys.user.service;

import com.etoak.rst.sys.user.DTO.UserDto;
import com.etoak.rst.sys.user.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService implements IUserService{

    @Autowired
    UserMapper dao;

    @Override
    public UserDto Login(UserDto dto) {
        return dao.queryUsernameAndPwd(dto.getUsername(),dto.getPassword());
    }



    @Override
    public boolean Register(UserDto dto) {
        return dao.addUser(dto);
    }
}
